#-*- coding: utf-8 -*-
'''
Created on 27/04/2011

@author: ivan viguera caceres
'''
import gtk
import gtk.glade

class MooControllerTask:
    '''
    classdocs
    '''


    def __init__(self, delegate, *args):
        '''
        Constructor
        '''
        self.delegate = delegate
        self.name = args[0]
        self.task_date = args[1]
        
        self.widgets = gtk.glade.XML("/home/ivan/workspace/moocrawler/src/MooView/tareas_pendientes.glade")
        
        signals = { "gtk_main_quit" : self.close,
                   "destroy" : self.callback }
        self.widgets.signal_autoconnect(signals)
        
        self.window = self.widgets.get_widget("wTask")

    def callback(self, widget, user_param1=None):
        print 'hola'  
    def start(self):
        gtk.main()
    
    def close(self, widget=None):
        self.delegate.remove_view(self.name)
        self.window.destroy()
        print '39'
        gtk.main_quit()